package com.example.jchuah.tiles;

/**
 * Created by jchuah on 11/12/2014.
 */
public class RowColPair {
    int row = -1;
    int col = -1;

    public Object clone() {
        RowColPair theClone = new RowColPair();
        theClone.row = row;
        theClone.col = col;
        return theClone;
    }

    public RowColPair getBelow() {
        RowColPair result = new RowColPair();
        result.row = row + 1;
        result.col = col;
        return result;
    }

    public RowColPair getAbove() {
        RowColPair result = new RowColPair();
        result.row = row - 1;
        result.col = col;
        return result;
    }
    public RowColPair getLeft() {
        RowColPair result = new RowColPair();
        result.row = row;
        result.col = col - 1;
        return result;
    }
    public RowColPair getRight() {
        RowColPair result = new RowColPair();
        result.row = row;
        result.col = col + 1;
        return result;
    }
}
